<%@page import="javax.portlet.PortletMode"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@page import="com.liferay.portal.kernel.util.ParamUtil"%>
<%@page import="javax.portlet.PortletURL"%>
<%@page import="javax.portlet.ActionRequest"%>
<%@page import="com.mto.module.karaoke.model.Song"%>
<%@page import="com.mto.module.karaoke.service.SongLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.util.StringPool"%>
<%@page import="com.mto.module.karaoke.model.impl.SongImpl"%>
<%@page import="com.mto.module.karaoke.service.SongServiceUtil"%>
<%@page import="com.liferay.portal.kernel.util.ListUtil"%>
<%@page import="com.mto.module.karaoke.model.impl.UserSongsImpl"%>
<%@page import="com.mto.module.karaoke.model.UserSongs"%>
<%@page import="com.mto.module.karaoke.service.UserSongsServiceUtil"%>

<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui" %>
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
<%@ taglib uri="http://liferay.com/tld/security" prefix="liferay-security" %>
<%@ taglib uri="http://liferay.com/tld/theme" prefix="theme" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<portlet:defineObjects />
<theme:defineObjects />

<%
String ns = renderResponse.getNamespace();

String tab = ParamUtil.getString(request, "tab", "trang-chu");
String tabs = "trang-chu,phong-thu,san-khau";
if(themeDisplay.isSignedIn()) {
	tabs += ",quan-tri-bai-hat,quan-tri-danh-muc";
	if(portletDisplay.isModeEdit() && !tab.startsWith("quan-tri")) tab = "quan-tri-bai-hat";
}

PortletURL tab0Url = renderResponse.createRenderURL();
tab0Url.setParameter("jspPage", "/jsps/trang-chu/view.jsp");
tab0Url.setParameter("tab", "trang-chu");
tab0Url.setPortletMode(PortletMode.VIEW);

PortletURL tab1Url = renderResponse.createRenderURL();
tab1Url.setParameter("jspPage", "/jsps/phong-thu/view.jsp");
tab1Url.setParameter("tab", "phong-thu");
tab1Url.setPortletMode(PortletMode.VIEW);

PortletURL tab2Url = renderResponse.createRenderURL();
tab2Url.setParameter("jspPage", "/jsps/san-khau/view.jsp");
tab2Url.setParameter("tab", "san-khau");
tab2Url.setPortletMode(PortletMode.VIEW);

PortletURL tab3Url = renderResponse.createRenderURL();
tab3Url.setParameter("jspPage", "/jsps/quan-tri/list.jsp");
tab3Url.setParameter("tab", "quan-tri-bai-hat");
tab3Url.setPortletMode(PortletMode.EDIT);

PortletURL tab4Url = renderResponse.createRenderURL();
tab4Url.setParameter("jspPage", "/jsps/quan-tri/category/list.jsp");
tab4Url.setParameter("tab", "quan-tri-danh-muc");
tab4Url.setPortletMode(PortletMode.EDIT);


String basePath = request.getContextPath() + "/";
String imgPath = request.getContextPath() + "/resources/images/";

%>

<liferay-ui:tabs 
	names="<%=tabs %>" 
	param="tab" 	
	url0="<%=tab0Url.toString() %>" 
	url1="<%=tab1Url.toString() %>" 
	url2="<%=tab2Url.toString() %>" 
	url3="<%=tab3Url.toString() %>"
	url4="<%=tab4Url.toString() %>"
	tabsValues="<%=tabs %>" 
	value="<%=tab %>">
</liferay-ui:tabs>
